package org.lhh.server.config.ehcache;

import net.sf.ehcache.CacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.ClassUtils;

@Configuration
public class EhcacheConfig {

    private static final String PATH = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "config/ehcache.xml";

    @Bean
    public CacheManager cacheManager() {
        return CacheManager.create(PATH);
    }

}
